package com.yanghang.controller;

import com.yanghang.entity.Dept;
import com.yanghang.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DeptController {
    @Autowired
    private DeptService ds;
    @GetMapping("/dept/{deptId}")
    public Dept selectAllDept(@PathVariable("deptId") int deptId){
        return ds.selectAllDeptInformationById(deptId);
    }
}
